import request from "../utils/request";
import utils from "../utils/util.js";
export default {
	/**h
	 * 获取商品列表
	 */
	getProductsList(query = {}) {
		const queryParmas = utils.addParamsToURL(query);
		return request.get(`/pet/products/list?${queryParmas}`);
	},

	/**
	 * 获取商品详情
	 * @param {*} id
	 * @returns
	 */
	getGoodsById(id) {
		return request.get(`/pet/products/${id}`);
	},

	/**
	 * 积分兑换列表
	 * @returns
	 */
	getChangeList() {
		return request.get(`/pet/exchange/list1`);
	},
	
	/**
	 * 下单
	 */
	submitOrder(data){
		return request.post('/pet/exchange',data);
	}
};